home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / filesys / ramdev_gcc.h < prev    next >
C/C++ Source or Header  |  1996-09-12  |  2KB  |  57 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: ramdev_gcc.h,v 1.2 1996/08/01 17:41:24 digulla Exp $
  4.     $Log: ramdev_gcc.h,v $
  5.     Revision 1.2  1996/08/01 17:41:24  digulla
  6.     Added standard header for all files
  7.  
  8.     Desc:
  9.     Lang:
  10. */
  11. #ifndef RAMDEV_GCC_H
  12. #define RAMDEV_GCC_H
  13. #include <aros/libcall.h>
  14. #include <exec/execbase.h>
  15. #include <exec/io.h>
  16. #include <exec/devices.h>
  17. #include <dos/dos.h>
  18. #include <dos/filesystem.h>
  19.  
  20. struct rambase
  21. {
  22.     struct Device device;
  23.     struct ExecBase *sysbase;
  24.     struct DosLibrary *dosbase;
  25.     struct UtilityBase *utilitybase;
  26.     BPTR seglist;
  27.     ULONG unitcount;
  28.     struct MsgPort *port;        /* Port to put IORequests to */
  29.     struct SignalSemaphore *sigsem;    /* Semaphore for iofs */
  30.     struct IOFileSys *iofs;        /* IORequest to be aborted or NULL */
  31.     struct MinList waitdoslist;
  32. };
  33.  
  34. #define init(rambase, segList) \
  35. __AROS_LC2(struct rambase *, init, __AROS_LA(struct rambase *, rambase, D0), __AROS_LA(BPTR, segList, A0), struct ExecBase *, SysBase, 0, ram)
  36.  
  37. #define open(iob, unitnum, flags) \
  38. __AROS_LC3(void, open, __AROS_LA(struct ramrequest *, iob, A1), __AROS_LA(ULONG, unitnum, D0), __AROS_LA(ULONG, flags, D0), struct rambase *, rambase, 1, ram)
  39.  
  40. #define close(iob) \
  41. __AROS_LC1(BPTR, close, __AROS_LA(struct ramrequest *, iob, A1), struct rambase *, rambase, 2, ram)
  42.  
  43. #define expunge() \
  44. __AROS_LC0(BPTR, expunge, struct rambase *, rambase, 3, ram)
  45.  
  46. #define null() \
  47. __AROS_LC0(int, null, struct rambase *, rambase, 4, ram)
  48.  
  49. #define beginio(iob) \
  50. __AROS_LC1(void, beginio, __AROS_LA(struct ramrequest *, iob, A1), struct rambase *, rambase, 5, ram)
  51.  
  52. #define abortio(iob) \
  53. __AROS_LC1(LONG, abortio, __AROS_LA(struct ramrequest *, iob, A1), struct rambase *, rambase, 6, ram)
  54.  
  55. #endif
  56.  
  57.